@extends('admin')

@section('content')

    <p class="mb10">
        <a href="{{url('admin/financial/editfina/')}}" class="btn J_dialog" title="发布"><span class="add"></span>发布</a>
    </p>
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/financial/financial')}}" method="post" class="search_form">
            <label for="search_title">标题：</label>
            <input type="text" name="keyword"       id="search_title" class="input length_2 mr10"/>
            <label>是否下线：</label>
            <select name="isonline" class="length_2">
                <option value="-1">--请选择--</option>
                <option value="1">线上</option>
                <option value="0">已下线</option>
            </select>
            {{ csrf_field() }}
            <button type="submit" class="btn">提交查询</button>
        </form>

    </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>产品类别</th>
                    <th>产品代码</th>
                    <th>金额(元)</th>
                    <th>投标价格(万)</th>
                    <th>产品标题</th>
                    <th>周期(月)</th>
                    <th>年化率</th>
                    <th>新手标</th>
                    <th>手续费</th>
                    <th>销量</th>
                    <th>积分</th>
                    <th>限购</th>
                    <th>说明</th>
                    <th>礼包编辑</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($items as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td>{{$item->name}}</td>
                        <td>{{$item->productNo}}</td>
                        <td>&yen;{{$item->price}}</td>
                        <td>&yen;{{$item->bidpr}}</td>
                        <td>{{$item->title}}</td>
                        <td>{{$item->period}}</td>
                        <td>{{$item->annualRate}}</td>
                        <td>@if(1==$item->novice)是@else否@endif</td>
                        <td>&yen;{{$item->poundage}}</td>
                        <td>{{$item->totalsales}}</td>
                        <td>{{$item->fbonus}}</td>
                        <td>{{$item->limited}}</td>
                        <td><a href="{{url('admin/financial/explain/'.$item->id)}}" title="编辑 " class="mr10 J_dialog">[活动编辑]</a></td>
                        <td><a href="{{url('admin/financial/package/'.$item->id)}}" title="编辑 " class="mr10 J_dialog">[礼包编辑]</a></td>
                        <td>{{$item->updated_at}}</td>
                        <td>
                            <a href="{{url('admin/financial/editfina/'.$item->id)}}" title="编辑 " class="mr10 J_dialog">[编辑]</a>
                            <a href="{{url('admin/financial/dell/'.$item->id)}}" class="mr10 J_ajax_del">[删除]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$items->total()}} 条数据
        </div>

        @if ($items->hasPages())
            <div class="pager" style="width: 20%;margin: 0 auto;">
                {!! $items->appends($appends)->render() !!}
            </div>
        @endif

    </div>

@stop